﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StyleMVVM.DependencyInjection.Impl;

namespace StyleMVVM.DependencyInjection.Conditions
{
	[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
	public class ExportWhenInjectedIntoAttribute : Attribute, IExportConditionAttribute
	{
		private Type[] injectedType;

		public ExportWhenInjectedIntoAttribute(params Type[] injectedType)
		{
			this.injectedType = injectedType;
		}

		public IExportCondition ProvideCondition(Type exportType)
		{
			return new WhenInjectedInto(injectedType);
		}
	}
}